import numpy as np


def digital_freq(Signal):
    """
    Compute the digital frequency array similar to the MATLAB function Digital_freq.

    Parameters:
    Sampling_num: The number of samples.
    Sampling_rate: The sampling rate.

    Returns:
    f: The digital frequency array.
    """
    Sampling_num = Signal['Sampling_num']
    Sampling_rate = Signal['Sampling_rate']

    if Sampling_num % 2 == 0:
        num = Sampling_num // 2
        f = np.arange(-num, num) * Sampling_rate / Sampling_num
    else:
        num = (Sampling_num - 1) // 2
        f = np.arange(-num, num + 1) * Sampling_rate / Sampling_num

    return f
